<!--
 * @Author: zhangyang
 * @Date: 2022-02-28 17:19:35
 * @LastEditTime: 2022-08-13 16:59:37
 * @Description: 根组件
-->
<script setup lang="ts">
import { zhCN, dateZhCN } from 'naive-ui'
import { useLoadingStore } from '@/stores';
const { httpPending } = storeToRefs(useLoadingStore());
</script>

<template>
  <NConfigProvider :locale="zhCN" :date-locale="dateZhCN">
    <NSpin :show="httpPending" size="large">
      <RouterView />
    </NSpin>
    <!-- 基本提示 -->
    <NMessageProvider>
      <YoungMessage />
    </NMessageProvider>
    <!-- 通知提示 -->
    <NNotificationProvider :max="3" placement="top-right">
      <YoungNotice />
    </NNotificationProvider>
    <!-- 弹窗提示 -->
    <NDialogProvider>
      <YoungAlert />
    </NDialogProvider>
    <!-- 加载条 -->
    <NLoadingBarProvider>
      <YoungLoadingBar />
    </NLoadingBarProvider>
  </NConfigProvider>
</template>

<style lang="scss">
/*
滚动条美化
*/
::-webkit-scrollbar {
  width: 8px;
  height: 8px
}

::-webkit-scrollbar-track {
  background-color: rgba(73, 177, 245, .2);
  border-radius: 2em
}

::-webkit-scrollbar-thumb {
  background-color: #aaa;
  border-radius: 2em;
}

::-webkit-scrollbar-corner {
  background-color: transparent
}
</style>